Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fips): do not blindly remove /boot #86

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

pvalena
Copy link
Contributor

@pvalena pvalena commented Jul 11, 2024

The mount_boot method called from fips-noboot.sh in the pre-pivot hook blindly
executes rm -rf /boot if there is no boot= command line parameter, without
first checking that /boot is not already mounted by other means.

feat(fips): add progress messages

This allows to better understand at what point a FIPS integrity test failed.

Signed-off-by: Raymund Will [email protected]

fix(fips): only unmount /boot if it was mounted by the fips module

The do_fips method should only unmount /boot if it was mounted in the
mount_boot method.

In addition, now the mount_boot method checks if /boot is already mounted.

Signed-off-by: Raymund Will [email protected]

fix(fips): move fips-boot script to pre-pivot

This is needed in s390x to be able to use the same boot= command line
parameter in grub and zipl. Otherwise, boot= would need to be added only to
grub.cfg (not /etc/default/grub and thereby not to /boot/zipl/config).

Signed-off-by: Raymund Will [email protected]

(Cherry-picked commits:
91974e8ff116c7fd9f99963780dba501535700f5
a71e518fa1f14a9b96ae62ce90714ccd7d307d97
1cdb4cb8b5fb7f74e5be6998f9b561fbf73909e0
cd2a1d4571b2f768f2b67d03fd77191795042402)

Resolves: RHEL-45913

The `mount_boot` method called from fips-noboot.sh in the pre-pivot hook blindly
executes `rm -rf /boot` if there is no `boot=` command line parameter, without
first checking that /boot is not already mounted by other means.

feat(fips): add progress messages

This allows to better understand at what point a FIPS integrity test failed.

Signed-off-by: Raymund Will <[email protected]>

fix(fips): only unmount /boot if it was mounted by the fips module

The `do_fips` method should only unmount /boot if it was mounted in the
`mount_boot` method.

In addition, now the `mount_boot` method checks if /boot is already mounted.

Signed-off-by: Raymund Will <[email protected]>

fix(fips): move fips-boot script to pre-pivot

This is needed in s390x to be able to use the same `boot=` command line
parameter in grub and zipl. Otherwise, `boot=` would need to be added only to
`grub.cfg` (not `/etc/default/grub` and thereby not to `/boot/zipl/config`).

Signed-off-by: Raymund Will <[email protected]>

(Cherry-picked commits:
  91974e8ff116c7fd9f99963780dba501535700f5
  a71e518fa1f14a9b96ae62ce90714ccd7d307d97
  1cdb4cb8b5fb7f74e5be6998f9b561fbf73909e0
  cd2a1d4571b2f768f2b67d03fd77191795042402)

Resolves: RHEL-45913
@pvalena pvalena added the bug Something isn't working label Jul 11, 2024
@pvalena pvalena self-assigned this Jul 11, 2024
@pvalena
Copy link
Contributor Author

pvalena commented Jul 16, 2024

LGTM.

@pvalena pvalena merged commit ab2711d into redhat-plumbers:main Jul 16, 2024
41 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants